//
//  ViewController.swift
//  1.9.Picking the Date and Time with UIDatePicker
//
//  Created by joker on 15/7/21.
//  Copyright (c) 2015年 joker. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

    var datePicker: UIDatePicker!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        datePicker = UIDatePicker()
        datePicker.center = view.center
        datePicker.datePickerMode = .CountDownTimer
        view.addSubview(datePicker)
        
        let twoMinuts = (60) as NSTimeInterval
        datePicker.countDownDuration = twoMinuts
        view.addSubview(datePicker)
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }


}

